package com.kid.keep.enums;

import lombok.Getter;

/**
 * @Description 测评等级
 * @Author JOHN
 * @Create 2019-12-08
 * @Since 1.0.0
 */
public enum DateTypeEnum {
    WEEK(1, "按周"),
    MONTH(2, "当月"),
    YEAR(3, "当年");
    @Getter
    private Integer value;
    @Getter
    private String message;


    DateTypeEnum(Integer value, String message) {
        this.value = value;
        this.message = message;
    }

    public static DateTypeEnum getEnum(Integer value) {
        for (DateTypeEnum dateTypeEnum : DateTypeEnum.values()) {
            if (dateTypeEnum.value.equals(value)) {
                return dateTypeEnum;
            }
        }
        return null;
    }

}
